var express = require('express');
var router = express.Router();
var {reg,isUse,Login} = require("../servies/userService.js");
/* GET users listing. */
router.get('/login', async function(req, res, next) {
  const data=await Login(req.query)
  res.send(data)
});
router.post('/reg',async function(req, res, next) {
      const data= await reg(req.body);
      res.send(data)
});
router.post('/isUse',async function(req, res, next) {
      const data= await isUse(req.body.data);
      console.log(data);
      
      res.send(data)
});

module.exports = router;
